<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 *
 * @version 1.0
 * @author xpl0it
 */
class Report extends CI_Controller {

    function __construct() {
        parent::__construct();
//        $this->load->model('line_service_model');
//        $this->load->model('sdp_model');
        $this->load->model('pon_model');
        $this->load->model('customer_model');
//        $this->output->enable_profiler(TRUE);
    }

    function pon_costomer() {
        $this->checkauth();

        $data['pon'] = $this->pon_model->select_by_table('pon');
        $data['customer'] = $this->customer_model->select_by_table('vw_customer');

        $content = $this->load->view('report/pon_costomer', $data, true);
        $content_data = new stdClass();
        $content_data->content = $content;
        $this->load->view('template/render_dt', $content_data);
    }

    function chart_line_equip($year = '2557') {
        $this->checkauth();

        $data['year'] = $year;
        $content = $this->load->view('report/chart_line_equip', $data, true);
        $content_data = new stdClass();
        $content_data->content = $content;
        $this->load->view('template/render_dt', $content_data);
    }

    private function checkauth() {
        if (!$this->session->userdata('authen')) {
            redirect('admin/login/', 'refresh');
        }
    }

}

/* End of file customer.php */
/* Location: ./application/controllers/admin/line_service.php */